dhcpv4: use leasetime from a->lease
authorDavid Härdeman <david@hardeman.nu>
Thu, 9 Oct 2025 04:35:26 +0000 (06:35 +0200)
committerÁlvaro Fernández Rojas <noltari@gmail.com>
Tue, 4 Nov 2025 07:50:29 +0000 (08:50 +0100)
commitfc0abb66f122cc86703aabf3afb945b5458b304b
tree6324c55aced6459146f75bdbaec507764d2e53c5
parent74eeff193848a993ee0c42acbd2f4d58721e091c
dhcpv4: use leasetime from a->lease

Note that a->leasetime can ever only be zero or == a->lease->leasetime,
so simplify this a bit in preparation for the next patch.

src/config.c also changes a->leasetime, but always to match
a->lease->leasetime.

Signed-off-by: David Härdeman <david@hardeman.nu>
Link: https://github.com/openwrt/odhcpd/pull/292
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
src/dhcpv4.c